using Common;
using CSC440TeamOne.CSC440BusinessService.Interface.Services;
using Microsoft.Practices.CompositeWeb;
using Microsoft.Practices.Unity.Utility;

namespace CSC440TeamOne.MyNutrition
{
    public class MyNutritionController : IMyNutritionController
    {
        private IBusinessService _BusinessService;

        public MyNutritionController([ServiceDependency] IBusinessService businessService)
        {
            Guard.ArgumentNotNull(businessService, "businessService");

            _BusinessService = businessService;
        }

        public MyRecipeViewModel LoadMyRecipeViewModelForCurrentUser()
        {
            return _BusinessService.LoadMyRecipeViewModelForCurrentUser();
        }

        public MyFoodTrackerViewModel LoadMyFoodTrackerViewModelForCurrentUser()
        {
            return _BusinessService.LoadMyFoodTrackerViewModelForCurrentUser();
        }


        public void saveViewRecipeModel(MyRecipeViewModel model)
        {
            _BusinessService.saveViewRecipeModel(model);
        }

        public void loadRecipe(MyRecipeViewModel model)
        {
            _BusinessService.LoadRecipe(model);
        }

        public void loadRecipesByValue(MyRecipeViewModel model)
        {
            _BusinessService.LoadRecipeByValue(model);
        }

        public void loadRecipe(MyFoodTrackerViewModel model)
        {
            _BusinessService.LoadRecipe(model);
        }

        public void loadRecipesByValue(MyFoodTrackerViewModel model)
        {
            _BusinessService.LoadRecipeByValue(model);
        }

        public MyRecipeViewModel LoadPrintableRecipe(int id)
        {
            MyRecipeViewModel model = new MyRecipeViewModel();
            _BusinessService.LoadPrintableRecipe(model);
            return model;
        }

        public MyRecipeViewModel LoadPrintableRecipe2(int id)
        {
            MyRecipeViewModel model = new MyRecipeViewModel();
            _BusinessService.LoadPrintableRecipe2(model);
            return model;
        }
    }
}
